<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>阴影效果</title>
<style type="text/css">
canvas {
	border:1px solid #000;
}
</style>
<script type="text/javascript">
function Draw(){
	var canvas=document.getElementById("canvas");
	var context = canvas.getContext("2d");
	// 设置阴影属性
	context.shadowColor="#666";
	context.shadowOffsetX=5;
	context.shadowOffsetY=5;
	context.shadowBlur=5.5;
	// 绘制文本
	context.fillStyle="#f90";
	context.font="bold 36px impact";
	context.fillText("Hello World!",10,50);
	// 路径绘制图形
	context.fillStyle="#f90";
	context.arc(100,100,30,0,Math.PI*2,false);
	context.fill();
}
window.addEventListener("load",Draw,true);
</script> 
</head>
<body style="overflow:hidden">
<canvas id="canvas" width="400" height="300">你的浏览器不支持该功能！</canvas>
</body>
</html>
